<template>
	<view>
		<uv-sticky bgColor="#fff">
			<uv-tabs :list="list" inactive-style="color:'#666666'" lineColor="#daa03d"
				:activeStyle="{ color: '#daa03d'} " @click="handleCut"></uv-tabs>
		</uv-sticky>
		<!-- 商品记录 -->
		<view class="premium-products-frame" v-if="listShow===0">
			<view class="content-frame">
				<view class="content-item">
					<view class="image-frame">
						<image src="/static/test/test_1.png" class="image" mode=""></image>
					</view>
					<view class="title">
						天然和田玉珠子挂件
					</view>
					<view class="price">
						￥18,400
					</view>
				</view>
			</view>
		</view>
		<!-- 文章记录 -->
		<view class="culture-frame" v-if="listShow===1">
			<view class="culture-item" v-for="(item, index) in 3" :key="index">
				<view class="culture-item-left">
					<view class="title zi-hide-2">
						何为玉文化？对中国玉文化的内涵探析，古人为何偏爱玉？...
					</view>
					<view class="">
						<uv-rate :count="1" :value="index + 1" inactiveColor="#daa03d" activeColor="#daa03d"></uv-rate>
					</view>
					<view class="tip">
						<image class="tip-image" src="/static/icon/icon_time.png" mode=""></image>
						<view class="tip-text">文化传承</view>|<view class="tip-text">2234人已阅读</view>
					</view>
				</view>
				<image src="/static/test/test_1.png" class="culture-item-right" mode=""></image>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				listShow: 0,
				list: [{
					name: '商品记录',
				}, {
					name: '文章记录',
				}, ]
			};
		},
		methods: {
			handleCut(e) {
				this.listShow = e.index
			}
		}
	}
</script>

<style lang="scss" scoped>
	.premium-products-frame {
		padding: 30rpx;
		background-color: #fff;
		font-size: 13px;
	}

	.content-frame {
		padding: 30rpx 0;
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		gap: 30rpx;

		.content-item {
			font-size: 16px;

			.image-frame {
				width: 330rpx;
				height: 330rpx;
				border-radius: 8px;
				overflow: hidden;
				position: relative;

				.image {
					width: 100%;
					height: 100%;
				}

				.icon-heart {
					position: absolute;
					transition: all .3s;
					bottom: 30rpx;
					right: 30rpx;
					width: 25px;
					height: 25px;
				}
			}

			.title {
				font-size: $title;
				padding-top: 5px;
			}

			.price {
				padding-top: 5px;
				color: #deaf5c;
			}
		}
	}

	.culture-frame {
		padding: 30rpx;
		background-color: #fff;
		font-size: 13px;

		.culture-item {
			display: flex;
			justify-content: space-between;
			padding: 30rpx 0;
			border-bottom: 1px solid #eee;

			.culture-item-left {
				width: calc(100% - 166rpx - 30rpx);
				height: 166rpx;
				display: flex;
				flex-direction: column;
				justify-content: space-between;

				.title {
					font-size: $title;
				}

				.tip {
					font-size: 13px;
					display: flex;
					align-items: center;

					.tip-image {
						width: 13px;
						height: 13px;
					}

					.tip-text {
						color: #76d0cc;
						padding: 0 5px;
					}
				}
			}

			.culture-item-right {
				width: 166rpx;
				height: 166rpx;
			}
		}

		.culture-item:last-child {
			border: none;
		}
	}
</style>